home *** CD-ROM | disk | FTP | other *** search
- #ifndef FILE_H
- #define FILE_H
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- /************************************************************************/
-
- struct Word /* Note: EOF returns an empty word */
- {
- struct MinNode Node;
-
- unsigned long Line; /* file position of word */
-
- int Whitespace; /* how much whitespace between this word and the prev word? */
- int Newline; /* how many newlines *before* the whitespace? */
-
- int Special; /* is this a special word? */
-
- size_t Length; /* strlen(Word) */
- char Word[1];
- };
-
- extern char *ReadFilename;
- extern char *WriteFilename;
-
- /************************************************************************/
-
- void ROpen (int, char *);
- void RClose (void);
-
- struct Word *ReadWord (int);
- void UnreadWord (struct Word *);
-
- #if 0
- void FreeWord (struct Word *);
- #else
- #define FreeWord(Word) free(Word)
- #endif
-
- char *ReadUntil (char *);
- long ReadSkip (void);
-
- void WOpen (int, char *);
- void WriteHeader (char *, char *);
- void WClose (void);
- void WriteWhitespace (struct Word *);
- void WriteWord (struct Word *);
- void WHeadline (char *);
-
- void WPrintf (char *,...);
-
- #endif /* FILE_H */
-